// 级联运算符

void main() {
  var arr = [5, 6, 10, 3, 2, 12, 8, 4, 7, 1, 11, 9];
  arr
    ..retainWhere((element) => (element % 2 == 0))
    ..sort(((a, b) => a.compareTo(b)))
    ..removeLast();
  print(arr);
}
